﻿<%@ WebHandler Language="C#" Class="CreateNews" %>

using System;
using System.Web;
using System.Data;

public class CreateNews : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string strFileName = "news1";
        string oHtml=HtmlHelper.ReadModel("news.html");
        strFileName =HttpContext.Current.Server.MapPath("/UI/") + strFileName;
        DB link = new DB();
        DataTable classtb = link.Get("select title,content from news");
        HtmlOperation.Replace(classtb, oHtml,"标题|内容");
        context.Response.Write("Hello World");
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}